#ifndef SHA1_H
#define SHA1_H

/*****
  FIPS, "Secure Hash Standard", United States of America,
  National Institute of Science and Technology, Federal
  Information Processing Standard (FIPS) 180-1, April 1993.

  D. Eastlake and P. Jones, "US Secure Hash Algorithm 1 (SHA1),"
  Internet Engineering Task Force RFC 3174, September 2001.
 *****/

#include <string>

namespace socklib {
  struct sha1digest {
    unsigned char digest_raw[20];
    char          digest_hex_str[41];

    sha1digest() { digest_raw[0] = digest_hex_str[0]= 0; }
    sha1digest(const void* instr, size_t instr_len=0) { digest(instr, instr_len); }

    const char* digest(const void* instr, size_t instr_len=0);
  };

  std::string sha1hex(const void* instr, size_t instr_len=0);
}

#endif // SHA1_H